<template>
  <div :class="props.label ? 'title' : 'notitle'">
    <div :class="props.required ? 'required' : ''" v-if="props.required">*</div>
    {{ props.label }}
  </div>
</template>

<script setup>
const props = defineProps({
  required: {
    type: Boolean,
    default: false,
  },
  label: {
    type: String,
    default: "",
  },
});
</script>

<style scoped lang="scss">
@import "@/assets/styles/theme.scss";
.title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  margin-bottom: 10px;
  margin-top: 20px;
  box-sizing: border-box;
  .required {
    color: red;
    margin-right: 5px;
  }
}
.notitle {
  font-weight: 700;
  display: flex;
  margin-bottom: 10px;
  margin-top: 20px;
  height: 24px;
}
</style>
